﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WebPiket3Csv
{
    /// <summary>
    /// Логика взаимодействия для DlgOptions.xaml
    /// </summary>
    public partial class DlgOptions : Window
    {
        public DlgOptions()
        {
            InitializeComponent();
        }

        public void GetVal()
        {
            isSplay.IsChecked = PrjProperty.propertyIsSplay;

            isSplayCentalPoint.IsChecked = PrjProperty.propertyIsSplayCentarlPoint;

            scale.Text = PrjProperty.propertyScale.ToString();
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            PrjProperty.propertyIsSplay = (bool)isSplay.IsChecked;
            PrjProperty.propertyIsSplayCentarlPoint = (bool)isSplayCentalPoint.IsChecked;

            PrjProperty.propertyScale = PrjProperty.StrToDouble(scale.Text);
            Close();
        }
    }
}
